//
//  PTLearnDetailVC.m
//  PotentialTraining
//
//  Created by admin on 2018/1/28.
//  Copyright © 2018年 admin. All rights reserved.
//

#import "PTLearnDetailVC.h"

@interface PTLearnDetailVC ()

@end

@implementation PTLearnDetailVC

- (void)viewDidLoad {
    [super viewDidLoad];
    
    [self setUpNav];
    
    
    
    UITextView *contentTextView = [UITextView new];
    contentTextView.frame = CGRectMake(20, 20, kScreenWidth - 40, kScreenHeight - 20 - 90);
    contentTextView.text = [NSString stringWithFormat:@"        %@", self.content];
//    contentTextView.contentSize = CGSizeMake(kScreenWidth, kScreenWidth / 2);
    contentTextView.editable = NO;
//    contentTextView.layer.borderWidth = 0.5;
//    contentTextView.layer.borderColor = [UIColor blackColor].CGColor;
//    contentTextView.layer.cornerRadius = 5;
    contentTextView.textAlignment = NSTextAlignmentLeft;
    contentTextView.font = [UIFont systemFontOfSize:40];
    contentTextView.showsVerticalScrollIndicator = YES;
    [self.view addSubview:contentTextView];
    contentTextView.backgroundColor = [UIColor whiteColor];
//    contentTextView.text = self.content;
    
    
    
    
    
    
    
    
    return;
    
    UIScrollView *bgSc = [UIScrollView new];
    bgSc.frame = CGRectMake(0, 0, kScreenWidth, kScreenHeight - 20);
    bgSc.showsVerticalScrollIndicator = NO;
    bgSc.showsHorizontalScrollIndicator = NO;
    bgSc.bounces = NO;
    [self.view addSubview:bgSc];
    bgSc.backgroundColor = [UIColor whiteColor];
//    bgSc.backgroundColor = [UIColor greenColor];
    
    UILabel *contentLabel = [UILabel new];
    contentLabel.frame = CGRectMake(20, 20, kScreenWidth - 40, kScreenHeight - 20);
    contentLabel.text = [NSString stringWithFormat:@"        %@", self.content];
    contentLabel.textAlignment = NSTextAlignmentLeft;
    contentLabel.font = [UIFont systemFontOfSize:100];
    contentLabel.numberOfLines = 0;
    contentLabel.lineBreakMode = NSLineBreakByWordWrapping;
    [bgSc addSubview:contentLabel];
    contentLabel.backgroundColor = [UIColor whiteColor];
//    contentLabel.backgroundColor = [UIColor redColor];
    contentLabel.text = @"摘要】 荧光增白剂PF危害人体健康,其生产和使用过程中会因泄露造成厂区场地及周边土壤和地下水环境污染.目前未见土壤和地下水中PF分析方法的报道.提出土样和水样中PF的前处理方法,建立了高效液相色谱法测定PF的方法.样品的前处理中,对土样采用甲醇超声提取PF,对水样则采用固相萃取法,即先用C18柱富集净化,再用甲醇洗脱.PF采用反相高效液相色谱-紫外检测器进行分析.研究结果表明,在0.0510mg·L-1范围内荧光增白剂的浓度与峰面积具有良好的线性关系,相关系数r2>0.9999.土样中PF浓度在2.010mg·kg-1时,回收率为86.9%90.6%,相对标准偏差为2.81%4.22%,方法检出限为3.28μg·kg-1,定量限为13.13μg·kg-1.水样中PF浓度在0.010.05mg·L-1时,回收率为82.8%88.6%,相对标准偏差为2.46%3.49%,方法检出限为1.08μg·L-1,定量限为4.32μg·L-1.该方法已成功应用于南京某污染场地土壤和地下水的PF测量,结果表明该场地土壤和地下水均已遭受PF污染,浓度最大分别达到24.1mg·kg-1和0.044mg·L-";
    
    
    CGSize oldSize = CGSizeMake(kScreenWidth - 40, MAXFLOAT);
    CGSize newSize;
    
    NSString *content = [NSString stringWithFormat:@"        %@", self.content];
    
    newSize = [content boundingRectWithSize:oldSize options:NSStringDrawingUsesLineFragmentOrigin attributes:@{NSFontAttributeName: [UIFont systemFontOfSize:14]} context:nil].size;
    
    
    contentLabel.frame = CGRectMake(20, 20, newSize.width, newSize.height);
    bgSc.contentSize = CGSizeMake(newSize.width, newSize.height);
    
    // Do any additional setup after loading the view.
}


- (void) setUpNav
{
    
    self.title = @"知识详情";
    self.view.backgroundColor = [UIColor whiteColor];
}


- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
